package com.walker.weixin.entity.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.walker.weixin.entity.BaseMessage;

import java.io.Serializable;
import java.util.Map;

/**
 * @Description: 音乐消息
 * @ProjectName: wms_step
 * @Package: com.walker.weixin.entity.message
 * @ClassName: MusicMessage
 * @Author: yangyl
 * @CreateDate: 2020-07-20 16:54
 */
@XStreamAlias("xml")
public class MusicMessage extends BaseMessage implements Serializable {

    @XStreamAlias("Music")
    private Music music;

    public MusicMessage(Map<String, Object> requestMap, Music music) {
        super(requestMap, "music");
        this.music = music;
    }

    public static class Music implements Serializable {

        @XStreamAlias("Title")
        private String title;
        @XStreamAlias("Description")
        private String description;
        @XStreamAlias("MusicUrl")
        private String musicUrl;    //音乐链接
        @XStreamAlias("HQMusicUrl")
        private String hQMusicUrl; // 高质量音乐链接，WIFI环境优先使用该链接播放音乐
        @XStreamAlias("HumbMediaId")
        private String humbMediaId; //缩略图的媒体id，通过素材管理中的接口上传多媒体文件，得到的id

        public Music(String title, String description, String musicUrl, String hQMusicUrl, String humbMediaId) {
            this.title = title;
            this.description = description;
            this.musicUrl = musicUrl;
            this.hQMusicUrl = hQMusicUrl;
            this.humbMediaId = humbMediaId;
        }

        public Music(String humbMediaId) {
            this.humbMediaId = humbMediaId;
        }


        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public String getMusicUrl() {
            return musicUrl;
        }

        public void setMusicUrl(String musicUrl) {
            this.musicUrl = musicUrl;
        }

        public String gethQMusicUrl() {
            return hQMusicUrl;
        }

        public void sethQMusicUrl(String hQMusicUrl) {
            this.hQMusicUrl = hQMusicUrl;
        }

        public String getHumbMediaId() {
            return humbMediaId;
        }

        public void setHumbMediaId(String humbMediaId) {
            this.humbMediaId = humbMediaId;
        }
    }
}
